package com.doraro.platform.common.beans.params;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import io.swagger.annotations.ApiParam;
import lombok.Data;

@Data
public class PageParam<T> {
    @ApiParam(value = "页号", example = "1", type = "Integer")
    private Integer page = 1;
    @ApiParam(value = "页大小", example = "5", type = "Integer")
    private Integer size = 5;

    public Page<T> toPage() {
        return new Page<>(page, size);
    }
}
